package com.lan3g.Test.controller;

import com.lan3g.Test.Model.RegisterModel;
import com.lan3g.Test.pojo.User;
import com.lan3g.Test.util.JDBCUtil;

public class RegisterController {
    private RegisterModel model = new RegisterModel();

    public boolean register(User user){

        if (!model.hasThisName(user.getUsername())){
            JDBCUtil.closeConn();// 关闭连接
            return model.register(user);
        }
        JDBCUtil.closeConn();// 关闭连接
        return false;
    }
}
